<!-- 继承form.html模板 -->
{% extends "public/form.html" %}
{% block content %}
    <!-- 引入全局自定义组件 -->
    {% load switch select image submit %}
    <form class="layui-form model-form" action="">
        <input name="id" id="id" type="hidden" value="{{data.id}}">
        <div class="layui-form-item">
            <label class="layui-form-label">站点图片：</label>
            {% image "image|图片|90x90|建议上传尺寸450x450" data.image "" 0 %}
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">站点名称：</label>
                <div class="layui-input-inline">
                    <input name="name" value="{{data.name}}" lay-verify="required" autocomplete="off" placeholder="请输入站点名称" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">站点类型：</label>
                <div class="layui-input-inline">
                    {% select "type|1|站点类型|name|id" typeList data.type %}
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">URL地址：</label>
                <div class="layui-input-inline">
                    <input name="url" value="{{data.url}}" lay-verify="required" autocomplete="off" placeholder="请输入URL地址" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">序号：</label>
                <div class="layui-input-inline">
                    <input name="sort" value="{{data.sort}}" lay-verify="required|number" autocomplete="off" placeholder="请输入序号" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">状态：</label>
                <div class="layui-input-inline">
                    {% switch "status" "是|否" data.status|default:1 %}
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text" style="width: 625px;">
            <label class="layui-form-label">备注：</label>
            <div class="layui-input-block">
                <textarea name="note" placeholder="请输入备注" class="layui-textarea">{{data.note}}</textarea>
            </div>
        </div>
        {% submit "submit|立即保存,close|关闭" 1 "" %}
    </form>
{% endblock %}